import React, {PureComponent } from 'react';
import './index.less';
import { Carousel, WingBlank, Icon, Button } from 'antd-mobile';
import connect from '@/connect.js'
const isIPhone = new RegExp('\\biPhone\\b|\\biPod\\b', 'i').test(window.navigator.userAgent);
let moneyKeyboardWrapProps;
if (isIPhone) {
    moneyKeyboardWrapProps = {
        onTouchStart: e => e.preventDefault()
    };
}
@connect
class dropDownForm extends PureComponent {
    constructor(props) {
        super(props);
        this.state = {
            dataQuestion: [
                {
                    question: '这个椅子是可以组合的吗？',
                    number: '12',
                },
                {
                    question: '沙发质量怎么样，材质舒服吗？',
                    number: '8',
                },
                {
                    question: '设计带有一股特别的力量，操控着人体感知力联结意想世界',
                    number: '6',
                },
            ],
            dataPic: [
                {
                    picTou: 'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
                    commodity: '随形桌现代极简设计师铁艺不规则',
                    thumbs: ['新品','3色可选'],
                    look: '1000',
                    money: '299',
                    bigMoney: '655',
                    people: '77',
                    adress: '朝阳区居然之前北四法规及附近'
                },
                {
                    picTou: 'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
                    commodity: '随形桌现代极简设计师铁艺不规则',
                    thumbs: ['设计师款','3色可选'],
                    look: '5555',
                    money: '299',
                    bigMoney: '851',
                    people: '986',
                    adress: '朝阳区居然之前北四法规及附近'
                },
                {
                    picTou: 'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
                    commodity: '2021全新棠粉，给婀娜身姿的明媚羽衣',
                    thumbs: ['设计师款','2色可选'],
                    look: '2.1',
                    money: '299',
                    people: '15',
                    bigMoney: '2219',
                    adress: '朝阳区居然之前北四法规及附近'
                },
                {
                    picTou: 'https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=1238000549,973637751&fm=218&app=92&f=JPG?w=121&h=75&s=21D4EB22CED04DF76C0D2CE30300101E',
                    commodity: '气球沙发，瑞典国宝设计师致敬趣味心灵',
                    thumbs: ['设计师款','2色可选'],
                    look: '2.1',
                    money: '299',
                    bigMoney: '545',
                    people: '15',
                    adress: '朝阳区居然之前北四法规及附近'
                },
            ]
          }    
        }
        componentDidMount() {
          }
    render() {
        return (
            <div className="moreParameters">
                        <div className="product">
                <div className="product-number">
                <span className="product-numberCode">更多商品/看了又看</span>
                </div>
            </div>
            {
                this.state.dataPic.map((val, index) => {
                    return <div className="moreParameters-details" style={{marginTop: index === 0 ? '16px' : '15px'}}>
                    <img className="moreParameters-picTou" src={val.picTou}></img>
                    <div className="moreParameters-dataPic">
                      <div className="moreParameters-commodity">{val.commodity}</div>
                      <div className="moreParameters-thumbs">
                      {
                          val.thumbs.map((value, ind) => {
                              return <div className="moreParameters-thumbsDetails" style={{marginLeft: ind === 0 ? '0px' : '6px'}}>{value}</div>
                          })
                      }
                      </div>
                      <div className="recommendation-thumbs">
                      <div className="recommendation-data">
                    <span className="recommendation-icon">￥</span>
                    <span className="recommendation-lookthumbs">{val.money}</span>
                    <span className="recommendation-look">~{val.bigMoney}</span>
                    <span className="recommendation-people">{val.people || 0}人购买</span>
                    </div>
                    <Button className="recommendation-bac">免费接送</Button>
                    </div>
                      <div className="moreParameters-push">
                      <div className="moreParameters-adress">{val.adress}</div>
                      <span>距您{val.look}千米</span>
                      </div>
                    </div>
                    </div>
                })
            }
                  </div>
        );
    }
}
export default dropDownForm